-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: report ElasticCloud data tiers nodes roles #652
feat: report ElasticCloud data tiers nodes roles #652
Conversation
d11b559
to
c8a1083
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
collector/nodes.go
Outdated
@@ -84,7 +88,9 @@ func createRoleMetric(role string) *nodeMetric { | |||
} | |||
|
|||
var ( | |||
defaultNodeLabels = []string{"cluster", "host", "name", "es_master_node", "es_data_node", "es_ingest_node", "es_client_node"} | |||
defaultNodeLabels = []string{"cluster", "host", "name", "es_master_node", "es_data_node", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the format of the node metrics would need to change to add more roles. Adding all of these labels to the nodes metrics doesn't feel like a good idea to me. This variable appears to be referenced over 100 times in this file with most references being adding all of these labels to all of the metrics. A better approach may be to expose a new metric for node roles as a gauge with a 1 or 0 based on if the node has that role. I know that's a much different change to this and more involved, but I don't think it's sustainable to keep adding labels to these metrics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sysadmind ,
It makes sens, I see the point of nodes labels multiplicity.
Then, I propose an approach by changing only outputs of elasticsearch_nodes_roles{}
in the next commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output updated
$ curl -s http://localhost:9108/metrics | grep 'elasticsearch_nodes_roles'
# HELP elasticsearch_nodes_roles Node default roles
# TYPE elasticsearch_nodes_roles gauge
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.138.46",name="instance-0000000016",role="client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.138.46",name="instance-0000000016",role="data_content"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.138.46",name="instance-0000000016",role="data_hot"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.138.46",name="instance-0000000016",role="ingest"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.138.46",name="instance-0000000016",role="remote_cluster_client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.138.46",name="instance-0000000016",role="transform"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.143.78",name="instance-0000000015",role="client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.143.78",name="instance-0000000015",role="data_content"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.143.78",name="instance-0000000015",role="data_hot"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.143.78",name="instance-0000000015",role="ingest"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.143.78",name="instance-0000000015",role="remote_cluster_client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.22.143.78",name="instance-0000000015",role="transform"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.236.46",name="instance-0000000003",role="client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.236.46",name="instance-0000000003",role="data_warm"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.236.46",name="instance-0000000003",role="remote_cluster_client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.238.200",name="instance-0000000019",role="client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.238.200",name="instance-0000000019",role="master"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.238.200",name="instance-0000000019",role="remote_cluster_client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.241.205",name="instance-0000000021",role="client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.241.205",name="instance-0000000021",role="data_frozen"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.241.47",name="instance-0000000022",role="client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.241.47",name="instance-0000000022",role="data_cold"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.241.47",name="instance-0000000022",role="remote_cluster_client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.242.154",name="instance-0000000018",role="client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.242.154",name="instance-0000000018",role="master"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.242.154",name="instance-0000000018",role="remote_cluster_client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.242.162",name="instance-0000000007",role="client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.242.162",name="instance-0000000007",role="data_warm"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.242.162",name="instance-0000000007",role="remote_cluster_client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.245.96",name="instance-0000000020",role="client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.245.96",name="instance-0000000020",role="master"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.245.96",name="instance-0000000020",role="remote_cluster_client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.246.94",name="instance-0000000010",role="client"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.246.94",name="instance-0000000010",role="data_cold"} 1
elasticsearch_nodes_roles{cluster="xxxx",host="172.25.246.94",name="instance-0000000010",role="remote_cluster_client"} 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Christophe MORIO <cmorio@talend.com>
Signed-off-by: Christophe MORIO <cmorio@talend.com>
Signed-off-by: Christophe MORIO <cmorio@talend.com>
a78f309
to
b6b8ff7
Compare
Hi, are there any news for this PR? |
Hi @sysadmind , is it good for you ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
BREAKING CHANGES: The flag `--es.cluster_settings` has been renamed to `--collector.clustersettings`. * [CHANGE] Rename --es.cluster_settings to --collector.clustersettings * [FEATURE] Add ILM metrics #513 * [ENHANCEMENT] Add ElasticCloud node roles to role label #652 * [ENHANCEMENT] Add ability to use AWS IAM role for authentication #653 * [ENHANCEMENT] Add metric for index replica count #483 * [BUGFIX] Set elasticsearch_clusterinfo_version_info guage to 1 #728 * [BUGFIX] Fix index field counts with nested fields #675 --------- Signed-off-by: Joe Adams <github@joeadams.io>
…y#652) * feat: additional elasticcloud roles --------- Signed-off-by: Christophe MORIO <cmorio@talend.com>
…community#652)" This reverts commit ad3c442.
…community#652)" This reverts commit ad3c442.
On ElasticCloud clusters, nodes have specific roles regarding data tier leveling:
This PR add support for those roles.
Fixes #651